<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
	xmlns:f="http://xmlns.jcp.org/jsf/core"
	xmlns:h="http://xmlns.jcp.org/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
	template="/WEB-INF/templates/business/supplier/template.xhtml">

	<f:metadata>
		<f:viewParam name="firstResult"
			value="#{loginedUserCertList.firstResult}"></f:viewParam>
		<f:viewParam name="projectName"
			value="#{loginedUserCertList.parameterValues['projectName']}"></f:viewParam>
		<f:viewParam name="serialNumber"
			value="#{loginedUserCertList.parameterValues['serialNumber']}"></f:viewParam>
	</f:metadata>

	<ui:define name="supplier_content">
		<h:form id="queryForm">
			<div class="iethbox_tit">
				<h2>我的资质</h2>
			</div>
			<div class="iethbox_table">
				<p:dataTable value="#{loginedUserCertList.resultList}" var="_cert">

					<p:column>
						<f:facet name="header">资质名称</f:facet>
						#{_cert.qualificationClass.name}
					</p:column>

					<p:column>
						<f:facet name="header">批准时间</f:facet>
						<h:outputText value="#{_cert.approveDate}">
							<f:convertDateTime pattern="yyyy-MM-dd" />
						</h:outputText>
					</p:column>

					<p:column>
						<f:facet name="header">批准文号/资质证书号</f:facet>
						#{_cert.approveLicenseNo}
					</p:column>

					<ui:remove>
						<p:column>
							<f:facet name="header">联系人</f:facet>
							#{_cert.contactor}
						</p:column>
	
						<p:column>
							<f:facet name="header">联系人电话</f:facet>
							#{_cert.contactorPhoneNumber}
						</p:column>
					</ui:remove>
					
					<p:column>
						<f:facet name="header">有效日期</f:facet>
						<h:outputText value="#{_cert.allotedDate}">
							<f:convertDateTime pattern="yyyy-MM-dd" />
						</h:outputText>
					</p:column>

					<p:column>
						<f:facet name="header">审核机关</f:facet>
						#{_cert.approveDepartmentName}
					</p:column>
					
					<p:column>
						<f:facet name="header">审核时间</f:facet>
						<h:outputText value="#{_cert.currRejectRecord.rejectTime}" >
							<f:convertDateTime pattern="yyyy-MM-dd"/>						
						</h:outputText>
					</p:column>
					
					<p:column>
						<f:facet name="header">失败原因</f:facet>
						#{_cert.currRejectRecord.reason}
					</p:column>
					
					<p:column style="text-align: center;width:70px;">
						<f:facet name="header">操作</f:facet>
						<p:button outcome="ServiceSupplierFailedCertEdit.xhtml" value="编辑">
							<f:param name="certId" value="#{_cert.id}"></f:param>
						</p:button>	
					</p:column>
				</p:dataTable>
			</div>

			<ui:include src="/WEB-INF/templates/manage/pagination.xhtml">
				<ui:param name="entityList" value="#{loginedUserCertList}" />
			</ui:include>
		</h:form>
		 <p:button href="ServiceSupplierFailedCertEdit.xhtml" value="添加资质"></p:button>
	</ui:define>

</ui:composition>